/*
 * =====================================================================================
 *
 *       Filename:  test_logger.cpp
 *
 *    Description:  log的测试用例
 *
 *        Version:  1.0
 *        Created:  2008年08月28日 10时24分25秒
 *       Revision:  none
 *       Compiler:  g++
 *
 *         Author:  ZhixiongHong (hzx), fishwarter@gmail.com
 *        Company:  Unioncast
 *
 * =====================================================================================
 */
#include <iostream>
#include "log/logger.h"

using namespace std;
#ifdef HAS_SS_NAMESPACE
using namespace ss;
#endif


Logger* g_logger = NULL;

void test()
{
	string str = "test";
	g_logger = new Logger();	
	int i=0;
	g_logger->log(Logger::DEBUG, "call log DEBUG  %d", i++);
	g_logger->log(Logger::INFO, "call log INFO  %d", i++);
	g_logger->log(Logger::WARNING, "call log WARNING  %d", i++);
	g_logger->log(Logger::ERROR, "call log ERROR  %d", i++);
	g_logger->log(Logger::CRITICAL, "call log CRITICAL  %d", i++);

	g_logger->debug("call debug %d", i++);
	g_logger->info("call info %d", i++);
	g_logger->warning("call warning %d", i++);
	g_logger->error("call error %d", i++);
	g_logger->critical("call critical %d", i++);
	delete g_logger;
}


int main()
{
	cout << "++++++start test logger " << endl;
	test();
	cout << "++++++end test logger " << endl;
}

